﻿/*-----------------------------------------------
// File: BuffIcon0.cs
// Description: 
// Author: Shaobing	492057342@qq.com
-----------------------------------------------*/
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class BuffIcon0 : MonoBehaviour
{
    public UISprite iconSprite;
    public UILabel numLabel;

    string _iconName;
    int _count;

    public void Init(string iconName, int countNum = 1) {
        this._iconName = iconName;
        iconSprite.spriteName = _iconName;
        this._count = countNum;
        numLabel.text = _count.ToString();
    }

    public void AddCount() {
        _count++;
        numLabel.text = _count.ToString();
    }
    public void SubCount() {
        _count--;
        numLabel.text = _count.ToString();
    }

    public int GetCount() {
        return _count;
    }


}
